package com.mage.quickstart.config;

import com.mage.quickstart.model.Student;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration // 标记此类是一个配置类 相当于  <beans></beans>
public class StudentConfiguration {

    @Bean // 比较此方法返回的对象是交给Spring管理的对象Bean, 相当于 <bean name="方法名" class="返回类型" >
    public Student student() {
        Student student = new Student(1, "小明");
        return student;
    }
}
